<template>
  <CommonBox title="部门资产详情" width="1872px">
    <div class="assets-container">
      <div class="assets-list">
        <div class="list-header">
          <div class="header-text min-text">资产编号</div>
          <div class="header-text min-text">资产名称</div>
          <div class="header-text min-text">管理人</div>
          <div class="header-text min-text">品牌</div>
          <div class="header-text max-text">型号</div>
          <div class="header-text min-text">使用状态</div>
          <div class="header-text max-text">备注</div>
        </div>
        <div class="list-content">
          <div class="content-item" v-for="item in useAssetsList">
            <div class="item-text min-text">{{ item.zcbhx }}</div>
            <div class="item-text min-text">
              {{ type[item.zcmcx] || item.zcmc }}
            </div>
            <div class="item-text min-text">{{ item.lastname }}</div>
            <div class="item-text min-text">{{ item.pp }}</div>
            <div class="item-text max-text">{{ item.xh }}</div>
            <div class="item-text min-text">{{ status[item.zczt] }}</div>
            <div class="item-text max-text">{{ item.bz }}</div>
          </div>
        </div>
      </div>
    </div>
  </CommonBox>
</template>

<script setup>
import CommonBox from "../commonBox.vue";
import { type, status } from "@/lib";
const props = defineProps({
  useAssetsList: {
    type: Array,
    default: () => [],
  },
});
</script>

<style scoped lang="less">
.assets-container {
  width: 100%;
  min-height: 200px;
  display: flex;
  background: #ffffff;
  border-radius: 12px;

  .assets-list {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    .list-header {
      width: 100%;
      height: 40px;
      display: flex;
      border-bottom: 2px solid #e5e7eb;
      align-items: center;
      .header-text {
        font-size: 16px;
        font-weight: 800;
      }
      .min-text {
        width: 200px;
      }
      .max-text {
        width: 450px;
      }
    }
    .list-content {
      width: 100%;
      max-height: 500px;
      overflow-y: auto;
      padding-right: 4px;
      .content-item {
        width: 100%;
        min-height: 40px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid #e5e7eb;
        .item-text {
          font-size: 16px;
          font-weight: 400;
        }
        .min-text {
          width: 200px;
        }
        .max-text {
          width: 450px;
        }
      }
    }
  }
}
</style>
